SELECT * FROM ip_properties WHERE prActive = 1 AND (prLocation LIKE '{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}Sofia{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}' OR prCity = 'Sofia' OR prZip = 'Sofia' OR prStreet LIKE '{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}Sofia{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}' OR prCountry = 'Sofia') AND (prLocation LIKE '{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}Bulgaria{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}' OR prCity = 'Bulgaria' OR prZip = 'Bulgaria' OR prStreet LIKE '{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}Bulgaria{66c640b6afe515d19b504b6a8be2f827701d1c249691d6022f6c76c2881bf8f2}' OR prCountry = 'Bulgaria')